/**
 */
package fUML.Syntax.Actions.CompleteActions.util;

import fUML.Syntax.Actions.CompleteActions.*;

import java.util.Map;

import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.EObjectValidator;

/**
 * <!-- begin-user-doc -->
 * The <b>Validator</b> for the model.
 * <!-- end-user-doc -->
 * @see fUML.Syntax.Actions.CompleteActions.CompleteActionsPackage
 * @generated
 */
public class CompleteActionsValidator extends EObjectValidator {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final CompleteActionsValidator INSTANCE = new CompleteActionsValidator();

	/**
	 * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.common.util.Diagnostic#getSource()
	 * @see org.eclipse.emf.common.util.Diagnostic#getCode()
	 * @generated
	 */
	public static final String DIAGNOSTIC_SOURCE = "fUML.Syntax.Actions.CompleteActions";

	/**
	 * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'FUML is asynchronous' of 'Start Object Behavior Action'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final int START_OBJECT_BEHAVIOR_ACTION__FUML_IS_ASYNCHRONOUS = 1;

	/**
	 * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'FUML is class' of 'Read Extent Action'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final int READ_EXTENT_ACTION__FUML_IS_CLASS = 2;

	/**
	 * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'FUML old new classes' of 'Reclassify Object Action'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final int RECLASSIFY_OBJECT_ACTION__FUML_OLD_NEW_CLASSES = 3;

	/**
	 * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'FUML active context' of 'Accept Event Action'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final int ACCEPT_EVENT_ACTION__FUML_ACTIVE_CONTEXT = 4;

	/**
	 * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'FUML only signal event triggers' of 'Accept Event Action'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final int ACCEPT_EVENT_ACTION__FUML_ONLY_SIGNAL_EVENT_TRIGGERS = 5;

	/**
	 * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'FUML receive all triggering signals' of 'Accept Event Action'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final int ACCEPT_EVENT_ACTION__FUML_RECEIVE_ALL_TRIGGERING_SIGNALS = 6;

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 6;

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CompleteActionsValidator() {
		super();
	}

	/**
	 * Returns the package of this validator switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EPackage getEPackage() {
	  return CompleteActionsPackage.eINSTANCE;
	}

	/**
	 * Calls <code>validateXXX</code> for the corresponding classifier of the model.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
		switch (classifierID) {
			case CompleteActionsPackage.START_CLASSIFIER_BEHAVIOR_ACTION:
				return validateStartClassifierBehaviorAction((StartClassifierBehaviorAction)value, diagnostics, context);
			case CompleteActionsPackage.START_OBJECT_BEHAVIOR_ACTION:
				return validateStartObjectBehaviorAction((StartObjectBehaviorAction)value, diagnostics, context);
			case CompleteActionsPackage.REDUCE_ACTION:
				return validateReduceAction((ReduceAction)value, diagnostics, context);
			case CompleteActionsPackage.READ_EXTENT_ACTION:
				return validateReadExtentAction((ReadExtentAction)value, diagnostics, context);
			case CompleteActionsPackage.READ_IS_CLASSIFIED_OBJECT_ACTION:
				return validateReadIsClassifiedObjectAction((ReadIsClassifiedObjectAction)value, diagnostics, context);
			case CompleteActionsPackage.RECLASSIFY_OBJECT_ACTION:
				return validateReclassifyObjectAction((ReclassifyObjectAction)value, diagnostics, context);
			case CompleteActionsPackage.ACCEPT_EVENT_ACTION:
				return validateAcceptEventAction((AcceptEventAction)value, diagnostics, context);
			default:
				return true;
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateStartClassifierBehaviorAction(StartClassifierBehaviorAction startClassifierBehaviorAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(startClassifierBehaviorAction, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateStartObjectBehaviorAction(StartObjectBehaviorAction startObjectBehaviorAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(startObjectBehaviorAction, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(startObjectBehaviorAction, diagnostics, context);
		if (result || diagnostics != null) result &= validateStartObjectBehaviorAction_fUML_is_asynchronous(startObjectBehaviorAction, diagnostics, context);
		return result;
	}

	/**
	 * Validates the fUML_is_asynchronous constraint of '<em>Start Object Behavior Action</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateStartObjectBehaviorAction_fUML_is_asynchronous(StartObjectBehaviorAction startObjectBehaviorAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return startObjectBehaviorAction.fUML_is_asynchronous(diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateReduceAction(ReduceAction reduceAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(reduceAction, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateReadExtentAction(ReadExtentAction readExtentAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(readExtentAction, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(readExtentAction, diagnostics, context);
		if (result || diagnostics != null) result &= validateReadExtentAction_fUML_is_class(readExtentAction, diagnostics, context);
		return result;
	}

	/**
	 * Validates the fUML_is_class constraint of '<em>Read Extent Action</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateReadExtentAction_fUML_is_class(ReadExtentAction readExtentAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return readExtentAction.fUML_is_class(diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateReadIsClassifiedObjectAction(ReadIsClassifiedObjectAction readIsClassifiedObjectAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(readIsClassifiedObjectAction, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateReclassifyObjectAction(ReclassifyObjectAction reclassifyObjectAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(reclassifyObjectAction, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(reclassifyObjectAction, diagnostics, context);
		if (result || diagnostics != null) result &= validateReclassifyObjectAction_fUML_old_new_classes(reclassifyObjectAction, diagnostics, context);
		return result;
	}

	/**
	 * Validates the fUML_old_new_classes constraint of '<em>Reclassify Object Action</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateReclassifyObjectAction_fUML_old_new_classes(ReclassifyObjectAction reclassifyObjectAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return reclassifyObjectAction.fUML_old_new_classes(diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateAcceptEventAction(AcceptEventAction acceptEventAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(acceptEventAction, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validateAcceptEventAction_fUML_active_context(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validateAcceptEventAction_fUML_only_signal_event_triggers(acceptEventAction, diagnostics, context);
		if (result || diagnostics != null) result &= validateAcceptEventAction_fUML_receive_all_triggering_signals(acceptEventAction, diagnostics, context);
		return result;
	}

	/**
	 * Validates the fUML_active_context constraint of '<em>Accept Event Action</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateAcceptEventAction_fUML_active_context(AcceptEventAction acceptEventAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return acceptEventAction.fUML_active_context(diagnostics, context);
	}

	/**
	 * Validates the fUML_only_signal_event_triggers constraint of '<em>Accept Event Action</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateAcceptEventAction_fUML_only_signal_event_triggers(AcceptEventAction acceptEventAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return acceptEventAction.fUML_only_signal_event_triggers(diagnostics, context);
	}

	/**
	 * Validates the fUML_receive_all_triggering_signals constraint of '<em>Accept Event Action</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateAcceptEventAction_fUML_receive_all_triggering_signals(AcceptEventAction acceptEventAction, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return acceptEventAction.fUML_receive_all_triggering_signals(diagnostics, context);
	}

	/**
	 * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public ResourceLocator getResourceLocator() {
		// TODO
		// Specialize this to return a resource locator for messages specific to this validator.
		// Ensure that you remove @generated or mark it @generated NOT
		return super.getResourceLocator();
	}

} //CompleteActionsValidator
